CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${SOURCE_DIR} ${BINARY_DIR})

# add Qt modules here, the include will setup QT_LIBRARIES
SET(QT_USE_QTNETWORK TRUE)
SET(QT_USE_QTXML TRUE)

INCLUDE(${QT_USE_FILE})

# All C++ source files
SET(SRCS_CXX
  PageInfo.cpp
  factory/Factory.cpp
  gui/ButtonBar.cpp
  gui/Controller.cpp
  gui/HelpBox.cpp
  gui/MainWindow.cpp
  gui/PageDisplay.cpp
  main.cpp
  teletext/ARDTeletext.cpp
  teletext/BBC1Teletext.cpp
  teletext/BBC2Teletext.cpp
  teletext/NOSTeletext.cpp
  teletext/OmroepBrabantTeletext.cpp
  teletext/RTL4Teletext.cpp
  teletext/RTL5Teletext.cpp
  teletext/RTL7Teletext.cpp
  teletext/RTL8Teletext.cpp
  teletext/RTVNoordHollandTeletext.cpp
  teletext/RTVNoordTeletext.cpp
  teletext/RTVOostTeletext.cpp
  teletext/RTVRijnmondTeletext.cpp
  teletext/RTVWestTeletext.cpp
  teletext/TSSViewTeletext.cpp
  teletext/Teletext.cpp
  teletext/VRTTeletext.cpp
  teletext/VeronicaTeletext.cpp
  teletext/ZDFTeletext.cpp
  teletext/tssview/TSSView.cpp
)

# Which files have a Q_OBJECT macro?
SET(MOC_SRCS
  PageInfo.h
  gui/ButtonBar.h
  gui/Controller.h
  gui/HelpBox.h
  gui/MainWindow.h
  gui/PageDisplay.h
  teletext/ARDTeletext.h
  teletext/RTVRijnmondTeletext.h
  teletext/RTVWestTeletext.h
  teletext/TSSViewTeletext.h
  teletext/Teletext.h
  teletext/VeronicaTeletext.h
  teletext/ZDFTeletext.h
  teletext/tssview/TSSView.h
)

# MOC all Q_OBJECT macros
QT4_WRAP_CPP(SRCS_CXX ${MOC_SRCS})

ADD_EXECUTABLE(ttbqt ${SRCS_CXX})
TARGET_LINK_LIBRARIES(ttbqt ${QT_LIBRARIES})
